import ReplaceMenuProvider from 'bpmn-js/lib/features/popup-menu/ReplaceMenuProvider'

class RewritePopupMenuProvider extends ReplaceMenuProvider {
  private _bpmnFactory
  private _popupMenu
  private _modeling
  private _moddle
  private _bpmnReplace
  private _rules
  private _translate

  constructor(bpmnFactory, popupMenu, modeling, moddle, bpmnReplace, rules, translate) {
    super(bpmnFactory, popupMenu, modeling, moddle, bpmnReplace, rules, translate)

    this._bpmnFactory = bpmnFactory
    this._popupMenu = popupMenu
    this._modeling = modeling
    this._moddle = moddle
    this._bpmnReplace = bpmnReplace
    this._rules = rules
    this._translate = translate
  }

  getPopupMenuEntries(target) {
    const events = [
      {
        label: 'Start Event',
        actionName: 'replace-with-none-start',
        className: 'bpmn-icon-start-event-none',
        target: {
          type: 'bpmn:StartEvent'
        }
      },
      {
        label: 'Intermediate Throw Event',
        actionName: 'replace-with-none-intermediate-throwing',
        className: 'bpmn-icon-intermediate-event-none',
        target: {
          type: 'bpmn:IntermediateThrowEvent'
        }
      },
      {
        label: 'End Event',
        actionName: 'replace-with-none-end',
        className: 'bpmn-icon-end-event-none',
        target: {
          type: 'bpmn:EndEvent'
        }
      }
    ]
    return this._createEntries(target, events)
  }
}

export default RewritePopupMenuProvider
